package com.qs.aop.config;

import org.aspectj.lang.annotation.*;
import org.springframework.stereotype.Component;

@Component
@Aspect
public class MyAspect {

	@Pointcut("execution(public * com.qs.aop.service.AccountService.*(..))")
	public void myPointcut() {

	}

	public void  test(){

	}


	@AfterReturning("myPointcut()")
	public void afterReturnAdviceMethod() {
		System.out.println("after return advice invoke");
	}


	@After("myPointcut()")
	public void afterAdviceMethod() {
		System.out.println("after advice invoke");
	}

	@Before("myPointcut()")
	public void beforeAdviceMethod() {
		System.out.println("before advice invoke");
	}

	@AfterThrowing("myPointcut()")
	public void afterThrowingAdviceMethod(){
		System.out.println("after throwing advice invoke");
	}

}
